<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mobile Sales</title>
</head>
<body onload="doload()">
	<h1>Mobile Sales</h1>
	<hr />
	<h3>Login with Username and Password</h3>
	<label style="color:blue">avalable users: tony/0,jojo/0</label>
	<form id="loginForm" action='../j_spring_security_check' method='POST'  onsubmit="return checklogin()">
	<table>
		<tr><td>User:</td><td><input type='text' name='j_username' value='tony'></td></tr>
		<tr><td>Password:</td><td><input type='password' name='j_password' value='0'/></td></tr>
		<tr><td colspan="2">	<input type='checkbox' name='_spring_security_remember_me'/> Remember me on this computer.
			</td></tr>
	</table>
	<input type="submit" value="Login"></input><a href="/login/register.html"><input type="button" value="Register" disabled="disabled"></input></a>
	</form>
	<div id="errordiv" style="display:none;color:red">User not exists or password not matched!</div>
	<script type="text/javascript">
		function checklogin(){
			return true;
		}
		
		function doload(){
			if(getQueryString("hasError")){
				document.getElementById("errordiv").style.display = "block";
			}
		}

		function getQueryString(paramName){ 
		　　paramName = paramName .replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]").toLowerCase();
		　　var reg = "[\\?&]"+paramName +"=([^&#]*)"; 
		　　var regex = new RegExp( reg ); 
		　　var regResults = regex.exec( window.location.href.toLowerCase() ); 
		　　if( regResults == null )
		      return null; 
		　　else
		      return regResults [1];
		}
	</script>
</body>
</html>